package com.twentyOne.ClothingLand.service.impl;

import java.util.List;

import com.twentyOne.ClothingLand.dao.IStockDAO;
import com.twentyOne.ClothingLand.dao.impl.StockDAO;
import com.twentyOne.ClothingLand.service.IStockService;
import com.twentyOne.ClothingLand.vo.Stock;

public class StockService implements IStockService {
	
	private IStockDAO stockDAO = new StockDAO();
	
	@Override
	public void addStock(Stock stock) {
		
		this.stockDAO.addStock(stock);
		
	}

	@Override
	public void deleteStock(Stock stock) {
		
		this.stockDAO.deleteStock(stock);
		
	}

	@Override
	public void modifyStock(Stock stock) {
		
		this.stockDAO.modifyStock(stock);
		
	}

	@Override
	public List<Stock> searchAllStock(int stockId, int type) {

		return this.stockDAO.searchAllStock(stockId, type);
		
	}

	@Override
	public Stock searchStockByInfo(int stockId, int type, String barcode) {

		return this.stockDAO.searchStockByInfo(stockId, type, barcode);
		
	}

}
